import request from '@/utils/request'

// 查询专栏文章管理列表
export function listEmployeearticle(query) {
  return request({
    url: '/wechat/employeearticle/list',
    method: 'get',
    params: query
  })
}

// 查询专栏文章管理详细
export function getEmployeearticle(articleId) {
  return request({
    url: '/wechat/employeearticle/' + articleId,
    method: 'get'
  })
}
// 用户状态修改
export function changeRecommendStatus(articleId, isRecommend) {
  const data = {
    articleId,
    isRecommend
  }
  return request({
    url: '/wechat/employeearticle/changeRecommend',
    method: 'put',
    data: data
  })
}
// 新增专栏文章管理
export function addEmployeearticle(data) {
  return request({
    url: '/wechat/employeearticle',
    method: 'post',
    data: data
  })
}

// 修改专栏文章管理
export function updateEmployeearticle(data) {
  return request({
    url: '/wechat/employeearticle',
    method: 'put',
    data: data
  })
}

// 删除专栏文章管理
export function delEmployeearticle(articleId) {
  return request({
    url: '/wechat/employeearticle/' + articleId,
    method: 'delete'
  })
}

// 导出专栏文章管理
export function exportEmployeearticle(query) {
  return request({
    url: '/wechat/employeearticle/export',
    method: 'get',
    params: query
  })
}